<div class="panel panel-default">
    <div class="panel-body">
        <div class="row">
            <div class="col-md-9">
                <form class="form-horizontal">
                    <div class="form-group">
                        <label for="uesrType" class="control-label col-md-2">店长类型</label>
                        <div class="col-md-2">
                            <select class="form-control input-sm" name="uesrType" id="uesrType" [(ngModel)]="condition.userType">
                                                  <option value="">--请选择--</option>
                                                  <option value="FirstAgentUser">队长</option>
                                                  <option value="SecondAgentUser">店员</option>
                                                 </select>
                        </div>
                        <label for="keyword" class="control-label col-md-2">关键词</label>
                        <div class="col-md-2">
                            <input type="text" class="form-control input-sm" name="keyword" id="keyword" placeholder="" [(ngModel)]="condition.keyword" />
                        </div>
                    </div>
                </form>
            </div>
            <div class="col-md-3">
                <button type="button" class="btn btn-sm btn-default" (click)="getAgents()" role="button">搜索</button>
            </div>
        </div>
    </div>
    <div class="panel-table">
        <table class="table table-bordered table-striped table-hover table-condensed">
            <thead>
                <tr>
                    <td>序号</td>
                    <td>*</td>
                    <th>姓名</th>
                    <th>手机号</th>
                    <th>类别</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <tr *ngFor="let agent of agentList?.items">
                    <td>{{agent.id}}</td>
                    <td class="thumbnail">
                        <img *ngIf="agent.userAvatarId" [src]="downloadUrl+agent.userAvatarId" alt="" />
                        <img *ngIf="!agent.userAvatarId" src="../../../assets/app-logo-small.png" alt="" />
                    </td>
                    <td>{{agent.name}}</td>
                    <td>{{agent.phoneNumber}}</td>
                    <td>{{translateAgentType(agent.userType)}}</td>
                    <td>
                        <a class="btn btn-primary btn-sm" role="button" (click)="noNeedConfirm(agent.id)">无需确认</a>
                        <a class="btn btn-primary btn-sm" role="button" (click)="revoke(agent.id)">撤销</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="row">
            <div class="col-md-12">
                <pagination [boundaryLinks]="true" [maxSize]="5" [totalItems]="agentList?.totalCount" [(ngModel)]="currentPage" class="pagination-sm pull-right" [boundaryLinks]="true" [rotate]="false" previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;"
                    (pageChanged)="pageChanged($event)"></pagination>
            </div>
        </div>
    </div>
</div>